let arr=[10,20,30,40]
let j=arr.reduce((j,item)=>j=j*item,1)
console.log(j);